package com.lanju.controller;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.lanju.common.SpringUtils;
import com.lanju.model.ResultModel;
import com.lanju.model.SAModel;
import com.lanju.service.HouseHoldService;
import com.lanju.service.SystemAdminService;
/**
 * 管家控制器
 * @author Administrator
 *
 */
@Controller
@RequestMapping("houseHold")
public class HouseHoldController {

    @Autowired
    SystemAdminService systemAdminService;
    @Autowired
    HouseHoldService houseHoldService;

    /**
     * 获取管家信息
     * @param id
     * @param request
     * @return
     */
    @RequestMapping("/getHouseHold")
    @ResponseBody
    public Map<String,Object> getHouseHold(@RequestParam("id") Integer id, HttpServletRequest request){
		return houseHoldService.getHouseHold(id);
    }
    /**
     * 获取用户列表
     * @return
     */
    @RequestMapping("/getAllUser")
    @ResponseBody
    public Map<String,Object> getAllUser(HttpServletRequest request){
    	Map<String, Object> param = SpringUtils.getParameterMap(request);
		return houseHoldService.getAllUser(param);
    }
   
    
}
